package com.project8.book;

import java.io.Serializable;
import java.util.ArrayList;

public class Notebook implements Serializable
{
	private static final long serialVersionUID = 8564204640832658914L;
	
	ArrayList<NotebookPage> allNBPages = new ArrayList<NotebookPage>();
	
	public Notebook()
	{}
	
	
	public void addNewNBPage(NotebookPage pageNB)
	{
		System.out.println("This NB Page Name = " + pageNB.getTabLabel());
		allNBPages.add(pageNB);
	}
	
	public int getNumNotebookPages()
	{
		return allNBPages.size();
	}
	
	public NotebookPage removeNBPage(NotebookPage pageNB)
	{
		return (NotebookPage)allNBPages.remove(pageNB.getID());
	}
	
	public NotebookPage removeNBPage(int index)
	{
		return (NotebookPage)allNBPages.remove(index);
	}
	
	public NotebookPage getNBPage(int index)
	{
		return (NotebookPage)allNBPages.get(index);
	}
}
